package com.chaos.system.api.feign;

import com.chaos.framework.model.constant.FeignConstants;
import com.chaos.framework.model.dto.result.data.DataResult;
import com.chaos.system.api.constant.ServiceNameConstant;
import com.chaos.system.api.dto.AmapAddressDto;
import com.chaos.system.api.dto.AmapGeoDto;
import com.chaos.system.api.dto.BaiduLocationDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(value = ServiceNameConstant.SYSTEM_SERVICE)
public interface AmapFeign {


    @PostMapping(FeignConstants.FEIGN_PREFIX + "amap/geo")
    @ApiOperation(value = "根据地址确定经纬度", httpMethod = "POST")
    DataResult<AmapGeoDto> geo(@RequestBody AmapAddressDto address);


    @PostMapping(FeignConstants.FEIGN_PREFIX + "amap/regeo")
    @ApiOperation(value = "根据经纬度确定地址", httpMethod = "POST")
    DataResult<AmapAddressDto> regeo(@RequestBody AmapGeoDto geo);

}